<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<%@ include file="../../common/jsp/sheetHeader.jsp" %>

<link rel="Stylesheet" type="text/css" href="/Mass_template/common/wColorPicker/src/wColorPicker.css" />
<script type="text/javascript" src="/Mass_template/common/wColorPicker/lib/rgbHex.min.js"></script>
<script>
	$(document).ready(function() {
		//sheet 초기화  
		createIBSheet2(document.getElementById("viewArea"),"mySheet","100%","200px");
		
		mySheet.SetConfig({MergeSheet:msHeaderOnly});
		
		var headers = [
		    {Text:"상태|삭제|구/동|우편번호\n앞자리|우편번호뒷자리|우편번호뒷자리|등록일|최종변경일", Align:"Center"}
		    ,{Text:"상태|삭제|구/동|우편번호\n앞자리|시작|끝|등록일|최종변경일", Align:"Center"}
		];
		
		var cols = [
			{Type:"Status", Align:"Center"},
			{Type:"DelCheck", Align:"Center"},
			{Type:"Text", Width:245, TreeCol:1,LevelSaveName:"TREELEVEL",SaveName:"GuDong"},
			{Type:"Text", Width:65, Align:"Center",SaveName:"Zip1"},
			{Type:"Text", Width:65, Align:"Center",SaveName:"Zip2"},
			{Type:"Text", Width:65, Align:"Center",SaveName:"Zip3"},
			{Type:"Date", Width:100, Align:"Left"},
			{Type:"Date", Width:100, Align:"Left"}
		];
		
		mySheet.InitHeaders(headers);
		mySheet.InitColumns(cols);
	
		mySheet.FitColWidth();		//컬럼의 너비 조정
		mySheet.SetExtendLastCol(1);
		
		doAction("search");
		
		createIBSheet2(document.getElementById("viewArea2"),"mySheet2","100%","200px");
		mySheet2.SetConfig({MergeSheet:msHeaderOnly});
		mySheet2.InitHeaders(headers);
		mySheet2.InitColumns(cols);
	
		mySheet2.FitColWidth();		//컬럼의 너비 조정
	});
	
	function mySheet_OnTreeChild(Row) {
		var str = mySheet.GetCellValue(Row,"GuDong");
		switch(str) {
			case "중구":
 				mySheet2.DoSearch("append_tree_list1.jsp", "", 1);
				break;
			case "종로구":
				mySheet2.DoSearch("append_tree_list2.jsp", "", 1);
				break;
			case "서대문구":
				mySheet2.DoSearch("append_tree_list3.jsp", "", 1);
				break;
			case "마포구":
				mySheet2.DoSearch("append_tree_list4.jsp", "", 1);
				break;
		}
	}

	/*Sheet 각종 처리*/
	function doAction(sAction) {
		switch (sAction) {
		case "search": //조회
			mySheet.DoSearch("../data/append_tree_list.xml");
			break;
		}
	}
	
</script>
<title>마스터/디테일 형태 조회</title>
</head>
<body>
<div id="main">
	<%@ include file="../../common/jsp/sheetNavi.jsp" %>	
	<div id="title">마스터/디테일 형태 조회</div>
	<div id="desc">
		자식노드를 펼칠때 데이터를 서버로 부터 가져온다.
	</div>
	
	<div id="functionArea">
		
	</div>
	
	<div id="viewArea">
	</div>
	
	<div id="viewArea2">
	</div>
</div>
</body>
</html>